<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>no_comments (TblDeCon)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/TblDeCon.rb, line 28</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">no_comments</span>
    <span class="ruby-ivar">@line</span> = <span class="ruby-value str">&quot;&quot;</span>
    <span class="ruby-identifier">cO</span> = <span class="ruby-keyword kw">false</span>
    
    <span class="ruby-keyword kw">while</span> <span class="ruby-ivar">@line</span> = <span class="ruby-ivar">@file</span>.<span class="ruby-identifier">gets</span>
      <span class="ruby-ivar">@words</span> = <span class="ruby-ivar">@line</span>.<span class="ruby-identifier">upcase</span>().<span class="ruby-identifier">split</span>(<span class="ruby-value str">' '</span>)    
      <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\/\*/</span>                  \
      <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">!=</span><span class="ruby-operator">~</span> <span class="ruby-regexp re">/\*\//</span>              \
      <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@cO</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
      <span class="ruby-keyword kw">then</span>
        <span class="ruby-comment cmt">#comment chunk open</span>
        <span class="ruby-identifier">cO</span> = <span class="ruby-keyword kw">true</span>
      <span class="ruby-keyword kw">end</span>
      
      <span class="ruby-keyword kw">if</span> ( <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/--/</span>                    \
      <span class="ruby-keyword kw">and</span> ( <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/\/\*/</span>              \
        <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/\*\/Z/</span>  )  )      \
      <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">cO</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
      <span class="ruby-keyword kw">then</span>
        <span class="ruby-ivar">@lines</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">no_inline_comments</span>( <span class="ruby-ivar">@line</span> ).<span class="ruby-identifier">strip</span>
      <span class="ruby-keyword kw">end</span>
      
      <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/\/\*/</span>                   \
      <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@words</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\*\//</span>               \
      <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@cO</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
      <span class="ruby-keyword kw">then</span>
         <span class="ruby-comment cmt">#comment chunk closed</span>
         <span class="ruby-ivar">@cO</span> = <span class="ruby-keyword kw">false</span>
        <span class="ruby-comment cmt">#print &quot;cO = false&quot;</span>
      <span class="ruby-keyword kw">end</span> 
    <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt">#while</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>